package cn.tedu.controller;

import cn.tedu.Service.CarService;
import cn.tedu.pojo.Car;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLOutput;
import java.util.List;

/**
 * @author :Colin
 * @version 创建时间: 2021/7/20 15:43
 */

@RestController
@RequestMapping("car")
public class CarController {
    @Autowired
    private CarService car;

    @RequestMapping("get")
    public List<Car> get(){

        return car.get();
    }
    @RequestMapping("insert")
    public String insert(Car c){
         car.insert(c);
         return "成功";
    }

}
